// StepProbInterface.H

#ifndef StepProbInterface_H
#define StepProbInterface_H

// Interface to the NLS_PetraGroup to provide for 
// residual and matrix fill routines.

#include <Epetra_Vector.h>
#include <LOCA_Parameter_Vector.H>
#include <NOX_Epetra_Interface_Jacobian.H>
#include <LOCA_Epetra_Interface_Required.H>

#include "StepWaveProb.H"


#define EVALINIT -9999


class  StepProbInterface : 
  public LOCA::Epetra::Interface::Required,
  public NOX::Epetra::Interface::Jacobian
{
  private:
    char *contParam;
    double prevEval;

  public:
    StepProbInterface(StepWaveProb &prob, char *contparam);
    ~StepProbInterface();

    void printSolution(const Epetra_Vector &x, double Q);
    void printEigenvector(const Epetra_Vector &x, double eval, int which);

    //! Compute and return F
    bool computeF(const Epetra_Vector& x, Epetra_Vector& F, FillType ft);

    //! Compute an explicit Jacobian
    bool computeJacobian(const Epetra_Vector& x, Epetra_Operator& Jac);

    //! Set a parameter in the user's code.
    void setParameters(const LOCA::ParameterVector& params);

    //! Application Operator: Object that points to the user's evaluation routines.
    /*! This is used to point to the actual routines and to store 
     *  auxiliary data required by the user's application for function/Jacobian
     *  evaluations that NOX does not need to know about.  This is type of 
     *  passdown class design by the application code.
     */ 
    StepWaveProb & problem;
};

#endif

